//
//  STBottomView.swift
//  Demo-04-TabBarTest
//
//  Created by 苏统世 on 16/5/17.
//  Copyright © 2016年 SuTon. All rights reserved.
//

import UIKit

class STBottomView: UIView {

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    override init(frame: CGRect) {
        super.init(frame: frame)
//        praiseButton.backgroundColor=UIColor.yellowColor()
        setupUI()
    }

    // MARK: - 布局UI
    private func setupUI(){
        backgroundColor=UIColor.lightGrayColor()
        self.addSubview(praiseButton)
        self.addSubview(commentButton)
        self.addSubview(transmitButton)
        
        praiseButton.snp_makeConstraints { (make) -> Void in
            make.leading.top.bottom.equalTo(self)
            make.width.equalTo(kScreen_W/3)
        }
        commentButton.snp_makeConstraints { (make) -> Void in
            make.size.top.equalTo(praiseButton)
            make.leading.equalTo(praiseButton.snp_trailing)
        }
        transmitButton.snp_makeConstraints { (make) -> Void in
            make.size.top.equalTo(praiseButton)
            make.trailing.equalTo(self)
        }
        
        
    }
    
    lazy var praiseButton:UIButton = UIButton(title: "赞", imageName: "timeline_icon_unlike", backgroundImageName: "timeline_card_bottom_background")
    
    lazy var commentButton:UIButton=UIButton(title: "评论", imageName: "timeline_icon_comment", backgroundImageName: "timeline_card_bottom_background")
    
    lazy var transmitButton:UIButton=UIButton(title: "转发", imageName: "timeline_icon_retweet", backgroundImageName: "timeline_card_bottom_background")
    

}
